// 扩展webpack配置

const path = require('path')

const CracoLessPlugin = require('craco-less');

module.exports = {
  plugins: [
    {
      plugin: CracoLessPlugin,
      options: {
        lessLoaderOptions: {
          lessOptions: {
            javascriptEnabled: true,
          },
        },
      },
    },
  ],
  webpack: {
    configure: (webpackConfig, { env, paths }) => {
      // 在这里可以添加或修改 webpack 配置
      return webpackConfig;
    },
    alias: {
      '@': path.resolve(__dirname, 'src')
    }
  }
}